<template>
  <div class="find-house">
    <van-nav-bar
      class="find-top"
      left-arrow
      @click-left="onClickLeft"
    >
     <!-- 搜索框 -->
    <van-search
  show-action
  label="北京▼"
  placeholder="请输入小区或地址"
  @click="onSearch"
>
  <template #action>
    <div @click="onSearch"><van-icon name="location-o" /></div>
  </template>
</van-search>
    </van-nav-bar>
  </div>
</template>

<script>
export default {
  name: 'find-house',

  methods: {
    onClickLeft () {
      this.$router.back()
    },
    onSearch () {
      this.$router.push('/citylist')
    }
  }
}
</script>

<style lang="less">
  .find-house {
  position: relative;
}
  .find-top {
    height: 50px;
    background-color: #21b97a;
  }
  .van-search {
  position:absolute;
  top: 25px;
  width: 100%;
  padding: 0 10px 0 18px;
  background-color: #fff;
  z-index: 2;
  font-size: 14px;
  color: #333;
}
</style>
